[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
Int 21 Fn 52  U - DOS 2+ Internal - "sysvars" - Get List Of Lists          [D]

   AH = 52h

Return: ES:BX -> DOS list of lists

Notes: partially supported by OS/2 v1.1 compatibility box (however, most
     pointers are FFFFh:FFFFh, LASTDRIVE is FFh, and the NUL header "next"
     pointer is FFFFh:FFFFh).
   on return, ES points at the DOS data segment (see also INT 2F/AX=1203h)

See Also: INT 2F/AX=1203h

Format of List of Lists:
Offset Size    Description
 -24   WORD    (DOS 3.1+) contents of CX from INT 21/AX=5E01h
 -22   WORD    (DOS ???+) LRU counter for FCB caching
 -20   WORD    (DOS ???+) LRU counter for FCB opens
 -18   DWORD   (DOS ???+) address of OEM function handler (see INT 21/AH=F8h)
           FFFFh:FFFFh if not installed or not available
 -14   WORD    (DOS ???+) offset in DOS CS of code to return from INT 21 call
 -12   WORD    (DOS 3.1+) sharing retry count (see AX=440Bh)
 -10   WORD    (DOS 3.1+) sharing retry delay (see AX=440Bh)
 -8    DWORD   (DOS 3+) pointer to current disk buffer
 -4    WORD    (DOS 3+) pointer in DOS data segment of unread CON input
       when CON is read via a handle, DOS reads an entire line,
         and returns the requested portion, buffering the rest
         for the next read.  0000h indicates no unread input
 -2    WORD    segment of first memory control block
 00h   DWORD   pointer to first Drive Parameter Block (see AH=32h)
 04h   DWORD   pointer to first System File Table (see below)
 08h   DWORD   pointer to active CLOCK$ device's header (most recently loaded
       driver with CLOCK bit set)
 0Ch   DWORD   pointer to active CON device's header (most recently loaded
       driver with STDIN bit set)
---DOS 2.x---
 10h   BYTE    number of logical drives in system
 11h   WORD    maximum bytes/block of any block device
 13h   DWORD   pointer to first disk buffer (see below)
 17h 18 BYTEs  actual NUL device driver header (not a pointer!)
       NUL is always the first device on DOS's linked list of device
       drivers. (see below)
---DOS 3.0---
 10h   BYTE    number of block devices
 11h   WORD    maximum bytes/block of any block device
 13h   DWORD   pointer to first disk buffer (see below)
 17h   DWORD   pointer to array of current directory structures (see below)
 1Bh   BYTE    value of LASTDRIVE command in CONFIG.SYS (default 5)
 1Ch   DWORD   pointer to STRING= workspace area
 20h   WORD    size of STRING area (the x in STRING=x from CONFIG.SYS)
 22h   DWORD   pointer to FCB table
 26h   WORD    the y in FCBS=x,y from CONFIG.SYS
 28h 18 BYTEs  actual NUL device driver header (not a pointer!)
       NUL is always the first device on DOS's linked list of device
       drivers. (see below)
---DOS 3.1-3.3---
 10h   WORD    maximum bytes per sector of any block device
 12h   DWORD   pointer to first disk buffer in buffer chain (see below)
 16h   DWORD   pointer to array of current directory structures (see below)
 1Ah   DWORD   pointer to system FCB tables (see below)
 1Eh   WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
 20h   BYTE    number of block devices installed
 21h   BYTE    number of available drive letters (largest of 5, installed
       block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
       current directory structure array.
 22h 18 BYTEs  actual NUL device driver header (not a pointer!)
       NUL is always the first device on DOS's linked list of device
       drivers. (see below)
 34h   BYTE    number of JOIN'ed drives
---DOS 4.x---
 10h   WORD    maximum bytes per sector of any block device
 12h   DWORD   pointer to disk buffer info record (see below)
 16h   DWORD   pointer to array of current directory structures (see below)
 1Ah   DWORD   pointer to system FCB tables (see below)
 1Eh   WORD    number of protected FCBs (the y in the CONFIG.SYS FCBS=x,y)
       (always 00h for DOS 5.0)
 20h   BYTE    number of block devices installed
 21h   BYTE    number of available drive letters (largest of 5, installed
       block devices, and CONFIG.SYS LASTDRIVE=).  Also size of
       current directory structure array.
 22h 18 BYTEs  actual NUL device driver header (not a pointer!)
       NUL is always the first device on DOS's linked list of device
       drivers. (see below)
 34h   BYTE    number of JOIN'ed drives
 35h   WORD    pointer within IBMDOS code segment to list of special program
       names (see below)
       (always 0000h for DOS 5.0)
 37h   DWORD   pointer to FAR routine for resident IFS utility functions
       (see below)
       may be called by any IFS driver which does not wish to
       service functions 20h or 24h-28h itself
 3Bh   DWORD   pointer to chain of IFS (installable file system) drivers
 3Fh   WORD    the x in BUFFERS x,y (rounded up to multiple of 30 if in EMS)
 41h   WORD    number of lookahead buffers (the y in BUFFERS x,y)
 43h   BYTE    boot drive (1=A:)
 44h   BYTE    flag: 01h to use DWORD moves (80386+), 00h otherwise
 45h   WORD    extended memory size in KB
---DOS 5.0-6.0---
 10h 39 BYTEs  as for DOS 4.x (see above)
 37h   DWORD   pointer to SETVER program list or 0000h:0000h
 3Bh   WORD    (DOS=HIGH) offset in DOS CS of function to fix A20 control
       when executing special .COM format
 3Dh   WORD    PSP of most-recently EXECed program if DOS in HMA, 0000h if low
 3Fh  8 BYTEs  as for DOS 4.x (see above)

Format of memory control block (see also below):
Offset Size    Description
 00h   BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
 01h   WORD    PSP segment of owner or
       0000h if free
       0006h if DR-DOS XMS UMB
       0007h if DR-DOS excluded upper memory ("hole")
       0008h if belongs to DOS
       FFFAh if 386MAX UMB control block (see AX=4402h"386MAX")
       FFFDh if 386MAX locked-out memory
       FFFEh if 386MAX UMB (immediately follows its control block)
       FFFFh if 386MAX 6.01 device driver
 03h   WORD    size of memory block in paragraphs
 05h  3 BYTEs  unused by MS-DOS
       (386MAX) if locked-out block, region start/prev region end
---DOS 2.x,3.x---
 08h  8 BYTEs  unused
---DOS 4+ ---
 08h  8 BYTEs  ASCII program name if PSP memory block or DR-DOS UMB,
         else garbage
       null-terminated if less than 8 characters

Notes: the next MCB is at segment (current + size + 1)
   under DOS 3.1+, the first memory block is the DOS data segment,
     containing installable drivers, buffers, etc.  Under DOS 4+ it is
     divided into subsegments, each with its own memory control block
     (see below), the first of which is at offset 0000h.
   for DOS 5+, blocks owned by DOS may have either "SC" or "SD" in bytes
     08h and 09h.  "SC" is system code or locked-out inter-UMB memory,
     "SD" is system data, device drivers, etc.
   Some versions of DR-DOS use only seven characters of the program name,
     placing a NUL in the eighth byte.

Format of MS-DOS 5+ UMB control block:
Offset Size    Description
 00h   BYTE    type: 5Ah if last block in chain, 4Dh otherwise
 01h   WORD    first available paragraph in UMB if control block at start
       of UMB, 000Ah if control block at end of UMB
 03h   WORD    length in paragraphs of following UMB or locked-out region
 05h  3 BYTEs  unused
 08h  8 BYTEs  block type name: "UMB" if start block, "SM" if end block in UMB

Format of STARLITE (General Software's Embedded DOS) memory control block:
Offset Size    Description
 00h   BYTE    block type: 5Ah if last block in chain, otherwise 4Dh
 01h   WORD    PSP segment of owner, 0000h if free, 0008h if belongs to DOS
 03h   WORD    size of memory block in paragraphs
 05h   BYTE    unused
 06h   WORD    segment address of next memory control block (0000h if last)
 08h   WORD    segment address of previous memory control block or 0000h
 0Ah  6 BYTEs  reserved

Format of DOS 4+ data segment subsegment control blocks:
Offset Size    Description
 00h   BYTE    subsegment type (blocks typically appear in this order)
       "D"  device driver
       "E"  device driver appendage
       "I"  IFS (Installable File System) driver
       "F"  FILES=  control block storage area (for FILES>5)
       "X"  FCBS=   control block storage area, if present
       "C"  BUFFERS EMS workspace area (if BUFFERS /X option used)
       "B"  BUFFERS=  storage area
       "L"  LASTDRIVE=  current directory structure array storage area
       "S"  STACKS=  code and data area, if present (see below)
       "T"  INSTALL= transient code
 01h   WORD    paragraph of subsegment start (usually the next paragraph)
 03h   WORD    size of subsegment in paragraphs
 05h  3 BYTEs  unused
 08h  8 BYTEs  for types "D" and "I", base name of file from which the driver
         was loaded (unused for other types)

Format of data at start of STACKS code segment (if present):
Offset Size    Description
 00h   WORD    ???
 02h   WORD    number of stacks (the x in STACKS=x,y)
 04h   WORD    size of stack control block array (should be 8*x)
 06h   WORD    size of each stack (the y in STACKS=x,y)
 08h   DWORD   pointer to STACKS data segment
 0Ch   WORD    offset in STACKS data segment of stack control block array
 0Eh   WORD    offset in STACKS data segment of last element of that array
 10h   WORD    offset in STACKS data segment of the entry in that array for
       the next stack to be allocated (initially same as value in 0Eh
       and works its way down in steps of 8 to the value in 0Ch as
       hardware interrupts pre-empt each other)

Note:  the STACKS code segment data may, if present, be located as follows:
    DOS 3.2:   The code segment data is at a paragraph boundary fairly early
       in the IBMBIO segment (seen at 0070:0190h)
    DOS 3.3:   The code segment is at a paragraph boundary in the DOS data
       segment, which may be determined by inspecting the segment
       pointers of the vectors for those of interrupts 02h, 08h-0Eh,
       70h, 72-77h which have not been redirected by device drivers or
       TSRs.
    DOS 4+ Identified by sub-segment control block type "S" within the DOS
       data segment.

See Also: INT B4"STACKMAN"

Format of array elements in STACKS data segment:
Offset Size    Description
 00h   BYTE    status: 00h=free, 01h=in use, 03h=corrupted by overflow of
       higher stack.
 01h   BYTE    not used
 02h   WORD    previous SP
 04h   WORD    previous SS
 06h   WORD    ptr to word at top of stack (new value for SP). The word at the
       top of the stack is preset to point back to this control block.

SHARE.EXE hooks (DOS 3.1-6.00):
(offsets from first system file table--pointed at by ListOfLists+04h)
Offset Size    Description
-3Ch   DWORD   pointer to FAR routine for ???

       Note: not called by MS-DOS 3.3, set to 0000h:0000h by
           SHARE 3.3+
-38h   DWORD   pointer to FAR routine called on opening file
       on call, internal DOS location points at filename(see AX=5D06h)

       Return: CF clear if successful
           CF set on error
               AX = DOS error code (24h) (see AH=59h)

       Note: SHARE directly accesses DOS-internal data to get name of
           file just opened
-34h   DWORD   pointer to FAR routine called on closing file
       ES:DI -> system file table

       Note: does something to every Record Lock Record for file
-30h   DWORD   pointer to FAR routine to close all files for given computer
       (called by AX=5D03h)
-2Ch   DWORD   pointer to FAR routine to close all files for given process
       (called by AX=5D04h)
-28h   DWORD   pointer to FAR routine to close file by name
       (called by AX=5D02h)
       DS:SI -> DOS parameter list (see AX=5D00h)
          DPL's DS:DX -> name of file to close

       Return: CF clear if successful
           CF set on error
               AX = DOS error code (03h) (see AH=59h)

.NG limit reached, continued in next section...

This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson